package io.renren.modules.sys.service.impl;

import io.renren.modules.sys.vo.OrderVO;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.SupplierDao;
import io.renren.modules.sys.entity.SupplierEntity;
import io.renren.modules.sys.service.SupplierService;


@Service("supplierService")
public class SupplierServiceImpl extends ServiceImpl<SupplierDao, SupplierEntity> implements SupplierService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<SupplierEntity> page = new Query<SupplierEntity>(params).getPage();
        page.setRecords(baseMapper.selectList(page , params));
        return new PageUtils(page);
    }

    @Override
    public List<SupplierEntity> purchasersList(Integer type) {
        return baseMapper.purchasersList(type);
    }

}
